#include <stdio.h>
int main()
{
	int arr[] = { 89,134,98,123,145 };
	int i = 0;
	int max = arr[1];
	for (i = 1; i < 5; i++)
	{
		if (max < arr[i])
		{
			int temp = 0;
			temp = arr[i];
			arr[i] = max;
			max = temp;
		}
	}
	printf("%d\n", max);
	for (i = 0; i < 5; i++)
	{
		printf("%d ", arr[i]);
	}
	return 0;
}